package com.mimaxueyuan.disruptor.demo07;

import com.lmax.disruptor.EventHandler;

import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

public class LongEventHandler2 implements EventHandler<LongEvent> {

	/**
	 * event:发布到RingBuffer中的事件
	 * sequence:当前正在处理的事件序列号
	 * endOfBatch:是否为Ringbuffer的最后一个
	 */
	@Override
	public void onEvent(LongEvent event, long sequence, boolean endOfBatch) throws Exception {
		System.out.println("----第二次任务----"+ event);
	}

}
